<?php

class params_garantia extends Baseparams_garantia
{
    public function save(PropelPDO $con = null)
	{
            if ($this->isNew()){
                $criteria = new Criteria;
                $criteria->add(params_garantiaPeer::ACTIVO,true);
                $param_viejo = params_garantiaPeer::doSelectOne($criteria);
                $param_viejo->setActivo(false);
                $param_viejo->save($con);
                $this->setActivo(true);
            }
            return parent::save($con);

        }
}
